package top.lyc829.iot_android.http.service;

import com.xuexiang.xhttp2.model.ApiResult;

import java.util.List;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Query;
import top.lyc829.iot_android.entity.Log;

/**
 * @Author lyc
 * @create 2021-05-30 17:48
 */
public interface LogService {

    @POST("/user/registerUser/")
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    Observable<ApiResult<Boolean>> registerUser(@Body RequestBody jsonBody);

    @GET("/index/get_logs")
    Observable<ApiResult<List<Log>>> getLogs(@Query("page") int page);
}
